package top.healthylife.gateway.platform.bank.dto.business;

import io.swagger.annotations.ApiModel;
import lombok.Getter;

/**
 * @author : GaoZeXi
 * @date 2021/8/17 10:06
 */
@Getter
@ApiModel("企业登记注册类型代码表")
public enum BusinessRegisterType {
    RT10("10", "中征码（原贷款卡编码）"),
    RT20("20", "统一社会信用代码"),
    RT30("30", "组织机构代码"),
    RT01("01", "工商注册号"),
    RT02("02", "机关和事业单位登记号"),
    RT03("03", "社会团体登记号"),
    RT04("04", "民办非企业登记号"),
    RT05("05", "基金会登记号"),
    RT06("06", "宗教证书登记号"),
    RT07("07", "律师事务所执业许可证号"),
    RT08("08", "司法鉴定许可证号"),
    RT41("41", "纳税人识别号（国税）"),
    RT42("42", "纳税人识别号（地税");
    String code;
    String name;

    BusinessRegisterType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static BusinessRegisterType getInstance(String code){
        for (BusinessRegisterType value : values()) {
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
